//
//  ViewController.m
//  myios02
//
//  Created by 邓佳杰 on 2020/8/27.
//  Copyright © 2020 dengjiajie. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIButton *gakki;

- (IBAction)up:(id)sender;

- (IBAction)down:(id)sender;

- (IBAction)left:(id)sender;

- (IBAction)right;

- (IBAction)increase;

- (IBAction)decrease;


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (IBAction)down:(id)sender {
    CGRect originFrame = self.gakki.frame;
    originFrame.origin.y += 10;
    self.gakki.frame = originFrame;
}

- (IBAction)up:(id)sender {
    CGRect originFrame = self.gakki.frame;
    originFrame.origin.y -= 10;
    self.gakki.frame = originFrame;
}

- (IBAction)decrease {
    CGRect originFrame = self.gakki.frame;
    originFrame.size.width -= 10;
    originFrame.size.height -= 10;
    self.gakki.frame = originFrame;
}

- (IBAction)increase {
    CGRect originFrame = self.gakki.frame;
    originFrame.size.width += 10;
    originFrame.size.height += 10;
    self.gakki.frame = originFrame;
}

- (IBAction)right {
    CGRect originFrame = self.gakki.frame;
    originFrame.origin.x += 10;
    self.gakki.frame = originFrame;
}

- (IBAction)left:(id)sender {
    CGRect originFrame = self.gakki.frame;
    originFrame.origin.x -= 10;
    self.gakki.frame = originFrame;
}


@end
